Contents | Index | < Browse | Browse >

LETTERcinULETTER An instream object, which reads from the standard input.

Overview
#include <iostream.h>

cin >> x;

<any type> x; // Any type, which can be used with istream::operator>>

Portability
AT&T Release 2 streams library

Description
At startup, cin is initialized with the standard input stream. Normally this is the CLI's console the program was started from.

See also
cout

Example

#include <iostream.h>

void main()
{
char name[80];
unsigned int age;
cout << "Please enter your name and age: ";
cin >> name >> age;
}